From 0f5fbb45a0b5ef9793e0b6fb442fdbfe2ef6ac6b Mon Sep 17 00:00:00 2001 From: "Ian.Campbell@xensource.com" Date: Wed, 9 Aug 2006 11:26:11 +0100 Subject: [PATCH] Fix BUG_ON on switch_mm if XENFEAT_writable_page_tables is enabled. Signed-of-by: Ian Campbell --- .../include/asm-i386/mach-xen/asm/mmu_context.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/mmu_context.h b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/mmu_context.h index 020be5aa07..317d597e92 100644 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/mmu_context.h +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/mmu_context.h @@ -51,7 +51,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mmuext_op _op[2], *op = _op; if (likely(prev != next)) { - BUG_ON(!test_bit(PG_pinned, &virt_to_page(next->pgd)->flags)); + BUG_ON(!xen_feature(XENFEAT_writable_page_tables) && + !test_bit(PG_pinned, &virt_to_page(next->pgd)->flags)); /* stop flush ipis for the previous mm */ cpu_clear(cpu, prev->cpu_vm_mask); -- 2.30.2